package com.power.sifa.correction.model;


import com.plf.core.common.domain.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * 社区矫正人员布控主表实体类
 */

@Entity
@ApiModel(value = "社区矫正人员布控主表")
@Data
@Table(name = "Apl_condeploy_cert", schema = "sfapprove")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Apl_condeploy_cert.Apl_condeploy_certPK.class) 用于复合组件
public class Apl_condeploy_cert extends BaseModel implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "序号")
    private String id;

    @ApiModelProperty(value = "禁止令内容")
    private String prohibit;

    @ApiModelProperty(value = "禁止期限起止日")
    private String startdate;

    @ApiModelProperty(value = "禁止期限终止日")
    private String enddate;

    @ApiModelProperty(value = "事实及依据")
    private String fact;

    @ApiModelProperty(value = "县级意见")
    private String countymsg;

    @ApiModelProperty(value = "地市意见")
    private String citymsg;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "县级申报人id")
    private String countyuserid;

    @ApiModelProperty(value = "县级申报人名称")
    private String countyusername;

    @ApiModelProperty(value = "县级申报时间")
    private String countydate;

    @ApiModelProperty(value = "地市审批人id")
    private String cityuserid;

    @ApiModelProperty(value = "地市审批人名称")
    private String cityusername;

    @ApiModelProperty(value = "地市审批时间")
    private String citydate;


    public Map<String, Object> parseMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("id", this.getId());
        map.put("prohibit", this.getProhibit());
        map.put("startdate", this.getStartdate());
        map.put("fact", this.getFact());
        map.put("countymsg", this.getCountymsg());
        map.put("citymsg", this.getCitymsg());
        map.put("remark", this.getRemark());
        map.put("countyuserid", this.getCountyuserid());
        map.put("countyusername", this.getCountyusername());
        map.put("countydate", this.getCountydate());
        map.put("cityuserid", this.getCityuserid());
        map.put("cityusername", this.getCityusername());
        map.put("citydate", this.getCitydate());
        return map;
    }

    public String getId() {
        return id;
    }

    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Apl_condeploy_certPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String) key;

        //Apl_condeploy_certPK pk = (Apl_condeploy_certPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}
